// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PUR_APPLICATION_ITEM
// * CreateDate    : 2012/3/9 15:33:51
// * Creater       : CodeSmith
// * LastChangeDate: 2012/3/9 15:33:51
// * LastChanger   : 2012/3/9 15:33:51
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class PurApplicationItemEntity : EntityBase
    {
        public PurApplicationItemTable TableSchema
        {
            get
            {
                return PurApplicationItemTable.Current;
            }
		}
		
		public PurApplicationItemEntity()
        {

        }
		
		public PurApplicationItemEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ApplicationItemId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ITEM_ID"]));
			this.ApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ID"]));
			this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
			this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
			this.Price = Convert.ToDecimal(CommonFunctions.ToObject(dr["PRICE"]));
			this.DeliveryRequiredDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["DELIVERY_REQUIRED_DATE"]));
			this.DeliveryPlanDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["DELIVERY_PLAN_DATE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.ProductSpecIn = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_SPEC_IN"]));
			this.ProductSpecOut = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_SPEC_OUT"]));
            this.PlanOrderItemId = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_ORDER_ITEM_ID"]));
            this.ProductTechnicId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TECHNIC_ID"]));
        }
		
		public PurApplicationItemEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ApplicationItemId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ITEM_ID"]));
			this.ApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ID"]));
			this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
			this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
			this.Price = Convert.ToDecimal(CommonFunctions.ToObject(dr["PRICE"]));
			this.DeliveryRequiredDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["DELIVERY_REQUIRED_DATE"]));
			this.DeliveryPlanDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["DELIVERY_PLAN_DATE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.ProductSpecIn = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_SPEC_IN"]));
			this.ProductSpecOut = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_SPEC_OUT"]));
            this.PlanOrderItemId = Convert.ToString(CommonFunctions.ToObject(dr["PLAN_ORDER_ITEM_ID"]));
            this.ProductTechnicId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TECHNIC_ID"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return PurApplicationItemTable.Current;
            }
        }
		
		#region Perporty List
        public string ApplicationItemId
        {
            get { return Convert.ToString(GetData(PurApplicationItemTable.C_APPLICATION_ITEM_ID)); }
            set { SetData(PurApplicationItemTable.C_APPLICATION_ITEM_ID, value); }
        }
		
        public string ApplicationId
        {
            get { return Convert.ToString(GetData(PurApplicationItemTable.C_APPLICATION_ID)); }
            set { SetData(PurApplicationItemTable.C_APPLICATION_ID, value); }
        }
		
        public string ProductId
        {
            get { return Convert.ToString(GetData(PurApplicationItemTable.C_PRODUCT_ID)); }
            set { SetData(PurApplicationItemTable.C_PRODUCT_ID, value); }
        }
		
        public decimal Qty
        {
            get { return Convert.ToDecimal(GetData(PurApplicationItemTable.C_QTY)); }
            set { SetData(PurApplicationItemTable.C_QTY, value); }
        }
		
        public decimal Price
        {
            get { return Convert.ToDecimal(GetData(PurApplicationItemTable.C_PRICE)); }
            set { SetData(PurApplicationItemTable.C_PRICE, value); }
        }
		
        public DateTime DeliveryRequiredDate
        {
            get { return Convert.ToDateTime(GetData(PurApplicationItemTable.C_DELIVERY_REQUIRED_DATE)); }
            set { SetData(PurApplicationItemTable.C_DELIVERY_REQUIRED_DATE, value); }
        }
		
        public DateTime DeliveryPlanDate
        {
            get { return Convert.ToDateTime(GetData(PurApplicationItemTable.C_DELIVERY_PLAN_DATE)); }
            set { SetData(PurApplicationItemTable.C_DELIVERY_PLAN_DATE, value); }
        }
		
        public string Remark
        {
            get { return Convert.ToString(GetData(PurApplicationItemTable.C_REMARK)); }
            set { SetData(PurApplicationItemTable.C_REMARK, value); }
        }
		
        public string ProductSpecIn
        {
            get { return Convert.ToString(GetData(PurApplicationItemTable.C_PRODUCT_SPEC_IN)); }
            set { SetData(PurApplicationItemTable.C_PRODUCT_SPEC_IN, value); }
        }
		
        public string ProductSpecOut
        {
            get { return Convert.ToString(GetData(PurApplicationItemTable.C_PRODUCT_SPEC_OUT)); }
            set { SetData(PurApplicationItemTable.C_PRODUCT_SPEC_OUT, value); }
        }

        public string PlanOrderItemId
        {
            get { return Convert.ToString(GetData(PurApplicationItemTable.C_PLAN_ORDER_ITEM_ID)); }
            set { SetData(PurApplicationItemTable.C_PLAN_ORDER_ITEM_ID, value); }
        }
        public string ProductTechnicId
        {
            get { return Convert.ToString(GetData(PurApplicationItemTable.C_PRODUCT_TECHNIC_ID)); }
            set { SetData(PurApplicationItemTable.C_PRODUCT_TECHNIC_ID, value); }
        }
		#endregion
	}
	
	
}	

